﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using EntityLayer;

namespace DataLayer.DAO
{
    public class clsT_PersonaDAO
    {
        private BDCONTRALORIAEntities ContextoDeObjs = new BDCONTRALORIAEntities();

        public List<T_Persona> listarPersonaEnvia()
        {
            List<T_Persona> listarPersonaEnvia = new List<T_Persona>();
            var q = from c in ContextoDeObjs.T_Persona
                    select c;
            listarPersonaEnvia = q.ToList();
            return listarPersonaEnvia;
        }

        public List<T_Persona> ListarAbogados()
        {
            List<T_Persona> ListarAbogados = new List<T_Persona>();
            var q = from c in ContextoDeObjs.T_Persona
                    where (c.CO_cargo == "01" && c.CO_persona != "00")
                    select c;
            ListarAbogados = q.ToList();
            return ListarAbogados;
        }
    }
}
